<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <title>Thymeleaf Example</title>
</head>
<body>
<div th:if="${condition1}">条件1为真时出现</div>
<div th:unless="${condition2}">条件2为假时出现</div>
<div th:switch="${value}">
  <div th:case="1">值是1</div>
  <div th:case="2">值是2</div>
  <div th:case="*">其他值</div>
</div>
</body>
</html>